package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.Contract;
import com.ruoyi.system.mapper.ContractMapper;
import com.ruoyi.system.service.ContractService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: ruohao
 * @Date: 2023/9/3
 **/
@Service
public class ContractServiceImpl implements ContractService {
    @Resource
    private ContractMapper contractMapper;

    @Override
    public List<Contract> selectList(Contract contract) {
        return contractMapper.selectList(contract);
    }

    @Override
    public Contract selectById(Long id) {
        return contractMapper.selectById(id);
    }

    @Override
    public Boolean create(Contract contract) {
        return contractMapper.insert(contract) == 1;
    }

    @Override
    public Boolean update(Contract contract) {
        return contractMapper.update(contract) == 1;
    }

    @Override
    public Boolean deleteById(Long id) {
        return contractMapper.deleteById(id) == 1;
    }
}
